﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FortuneHeaven.Web.Common;
using FortuneHeavenBAL;

namespace FortuneHeaven.Web.Pages.News
{
    public partial class ShowContent : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SetPageHeader(FortuneHeavenCommon.Enum.MainPageTabType.noselect);
            if (!IsPostBack)
            {
                string name = Request["newsname"];
                if (!string.IsNullOrEmpty(name))
                {
                    name = name.Trim();
                    NewsBO bo = new NewsBO();
                     bo.GetNewsByTitle(name);
                     FortuneHeavenCommon.DataMap.News news = bo.GetNewsByTitle(name);
                     if (news != null)
                     {
                         ltContent.Text = news.Content;
                     }
                }
                else
                {
                    TransferErrorPage();
                }
            }
        }
    }
}